﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InPhieuXuatKho.aspx.cs" Inherits="InPhieuXuatKho" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Xem giao dịch</title>
    <style type="text/css">
        body 
        {
	        color: black; 
	        margin: 0; 
	        padding: 0; 
	        margin-top:0;
        }
        /* Display Styles */
        td{
            background-color:#FFFFFF;
        }
       
        .PanelStyle
        {
	        text-align:center;
        }
        .LabelGachDuoi
        {
	        color:#000099;
	        border-top-width : 0px;
	        border-right-width : 0px;
	        border-bottom-width : 0px;
	        border-left-width : 0px;
	        width:auto;
	        font-weight:bold;
        }
    </style>

    <script src="../js/common.js"></script>

</head>
<body style="background-color: #ffffff">
    <form id="form1" runat="server" style="padding: 20px 20px 20px 50px;">
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td width="45%" valign="top">
                    <table cellpadding="0">
                        <tr>
                            <td style="text-align: center">
                                <asp:Image ID="Image1" runat="server" ImageUrl="~/Administration/Menu/logoBIDV.png" /></td>
                            <td style="text-align: center">
                                NGÂN HÀNG ĐẦU TƯ VÀ PHÁT TRIỂN VIỆT NAM
                                <br />
                                Chi nhánh:&nbsp;
                                <asp:Label ID="lblChiNhanh" runat="server" CssClass="LabelGachDuoi"></asp:Label>
                                <asp:SqlDataSource ID="dsTenChiNhanh" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
                                    ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"></asp:SqlDataSource>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center">
                                BIDV</td>
                            <td style="text-align: center">
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="55%" style="text-align: center" valign="top">
                    CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM<br />
                    <span class="Subhead">Độc lập - Tự do - Hạnh phúc </span>
                    <br />
                    <span class="Subhead">Ngày&nbsp;<%=DateTime.Now.Day.ToString() %>&nbsp;Tháng&nbsp;<%=DateTime.Now.Month.ToString() %>&nbsp;Năm&nbsp;<%=DateTime.Now.Year.ToString() %></span>
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td width="20px">
                </td>
                <td width="100%">
                    <p style="text-align: center">
                        <span style="font-size: 18pt"><strong>
                            <br />
                            PHIẾU XUẤT KHO<br />
                        </strong></span><span style="color: blue"><em>Số:</em></span><asp:Label runat="server"
                            ID="lblMaHoaDon" ForeColor="#FF0066" Font-Bold="True" Font-Italic="True"></asp:Label>
                    </p>
                    <asp:SqlDataSource ID="ds" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
                        ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"></asp:SqlDataSource>
                    <br />
                    <asp:Panel runat="server" ID="pnKhaiBaoThongTin" Width="100%">
                        <asp:Panel runat="server" ID="pnThongTinKhachHang" Width="100%">
                            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td width="20" nowrap style="height: 19px">
                                    </td>
                                    <td width="100%" class="Subhead" style="height: 19px">
                                        Họ tên người nhận:<asp:Label runat="server" ID="lblNguoiNhan_FullName" CssClass="LabelGachDuoi"></asp:Label>
                                        &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                                        CMT số:
                                        <asp:Label runat="server" ID="lblNguoiNhan_CMT" CssClass="LabelGachDuoi"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td width="20" nowrap style="height: 20px">
                                    </td>
                                    <td width="100%" style="height: 20px">
                                        Đơn vị:
                                        <asp:Label runat="server" ID="lblDonVi" CssClass="LabelGachDuoi"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td width="20" nowrap>
                                    </td>
                                    <td width="100%">
                                        Giấy giới thiệu số:
                                        <asp:Label runat="server" ID="lblGiayGioiThieuSo" CssClass="LabelGachDuoi"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20" nowrap style="height: 20px">
                                    </td>
                                    <td width="100%" style="height: 20px">
                                        Hình thức thanh toán:
                                        <asp:Label runat="server" ID="lblHinhThucThanhToan" CssClass="LabelGachDuoi"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel runat="server" ID="pnTaiKhoanThanhToan" Width="100%">
                            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td nowrap style="width: 20px">
                                    </td>
                                    <td width="100%" class="Subhead">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <table width="100%" cellspacing="1" border="0" cellpadding="1" bgcolor="black">
                                            <tr>
                                                <td>
                                                    <strong>Mã ấn chỉ</strong></td>
                                                <td>
                                                    <strong>Loại ấn chỉ</strong></td>
                                                <td>
                                                    <strong>Đơn vị tính</strong></td>
                                                <td>
                                                    <strong>Số lượng</strong></td>
                                                <td>
                                                    <strong>Seri</strong></td>
                                                <td>
                                                    <strong>Đơn giá</strong></td>
                                                <td>
                                                    <strong>Thành tiền</strong></td>
                                            </tr>
                                            <asp:Repeater OnItemDataBound="rptHoaDon_Detail_ItemDataBound" runat="server" ID="rptHoaDon_Detail">
                                                <ItemTemplate>
                                                    <tr>
                                                        <td>
                                                            <%# DataBinder.Eval(Container.DataItem,"MaAnChi")%>
                                                        </td>
                                                        <td>
                                                            <%# DataBinder.Eval(Container.DataItem,"LoaiAnChi")%>
                                                        </td>
                                                        <td>
                                                            <%# DataBinder.Eval(Container.DataItem,"DonViTinh")%>
                                                        </td>
                                                        <td>
                                                            <%# DataBinder.Eval(Container.DataItem,"SoLuong")%>
                                                        </td>
                                                        <td>
                                                            <%# DataBinder.Eval(Container.DataItem,"Seri")%>
                                                        </td>
                                                        <td>
                                                            <%# DataBinder.Eval(Container.DataItem,"DonGia")%>
                                                        </td>
                                                        <td>
                                                            <%# String.Format("{0:N2}", DataBinder.Eval(Container.DataItem, "ThanhTien"))%>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                            <tr>
                                                <td>
                                                    <strong></strong>
                                                </td>
                                                <td>
                                                    <strong>Cộng</strong></td>
                                                <td colspan="4">
                                                    <strong></strong><strong></strong><strong></strong><strong></strong>
                                                </td>
                                                <td>
                                                    <strong>Thành tiền</strong></td>
                                            </tr>
                                        </table>
                                        <asp:SqlDataSource ID="dsDetail" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
                                            ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>" SelectCommandType="StoredProcedure">
                                        </asp:SqlDataSource>
                                    </td>
                                </tr>
                            </table>
                            <asp:Label ID="lblTongTienBangSo" runat="server" CssClass="LabelGachDuoi"></asp:Label></asp:Panel>
                        <asp:Panel runat="server" ID="Panel1" Width="100%">
                            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td nowrap style="height: 19px; width: 20px;">
                                    </td>
                                    <td width="100%" class="Subhead" style="height: 19px">
                                        Tổng số tiền (bằng chữ):<asp:Label runat="server" ID="lblTongTienBangChu" CssClass="LabelGachDuoi"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td nowrap style="height: 20px; width: 20px;">
                                    </td>
                                    <td width="100%" style="height: 20px">
                                        Trong đó thuế GTGT:
                                        <asp:Label runat="server" ID="lblThueGTGT" CssClass="LabelGachDuoi"></asp:Label></td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </asp:Panel>
                </td>
                <td width="20px" nowrap>
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td style="text-align: center" valign="top" width="25%">
                    Người nhận<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="lblNguoiNhan" runat="server"></asp:Label>
                </td>
                <td style="text-align: center" valign="top" width="25%">
                    Thủ kho<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="lblThuKho" runat="server"></asp:Label>
                </td>
                <td width="25%" valign="top" style="text-align: center">
                    TP. Kế toán<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label runat="server" ID="lblKeToan"></asp:Label>
                </td>
                <td width="25%" valign="top" style="text-align: center">
                    Giám đốc<br />
                    <em>(ký tên, đóng dấu)</em><br />
                    <br />
                    <br />
                    <br />
                    <asp:Label runat="server" ID="lblGiamDoc"></asp:Label>
                </td>
            </tr>
        </table>
        <asp:Panel ID="pnPrint" runat="server" CssClass="PanelStyle">
            <br />
            <asp:Button runat="server" ID="btnPrint" Text="In phiếu" />
        </asp:Panel>
    </form>
</body>
</html>

<script language="javascript">
    function disableClick(input){
        input.checked == true ? input.checked = false : input.checked = true;
    }
     //Ham nay de in trang này với định dạng html
    function printPage(a){
        a.style.display="none";
        window.print();
        a.style.display="block";
    }
</script>

